FROM rabbitmq:3.6.10-management-alpine

#设置插件
RUN echo -e "[rabbitmq_management, rabbitmq_stomp, rabbitmq_web_stomp]." >/etc/rabbitmq/enabled_plugins && chmod a+r /etc/rabbitmq/enabled_plugins

EXPOSE 61613 5672 15672

# 创建docker
# sudo docker build  --no-cache -t weiguoxin/rabbitmq .

# 运行
# sudo docker run -d --restart=always --name rabbitmq --net=host weiguoxin/rabbitmq

# docker rabbitmq 安装教程
# https://blog.csdn.net/xuan602/article/details/84307981

# 添加用户
# rabbitmqctl  add_user  admin  123123ww
# 设置管理员
# rabbitmqctl  set_user_tags  admin administrator

# 创建一个虚拟主机
# rabbitmqctl add_vhost vhost_name
# 删除一个虚拟主机
# rabbitmqctl delete_vhost vhost_name

# 添加用户虚拟机权限
# rabbitmqctl set_permissions -p / username ".*" ".*" ".*"  //添加权限